<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript" src="jquery.min.js">

		</script>
	</head>
	<body>
		<button>快跑</button>
		<button>快跑</button>
		<button>快跑</button>
		<button>快跑</button>
		<button>快跑</button>
		<button>快跑</button>
		<script type="text/javascript">
			$(function() {
				//1.隐式迭代,给所有按钮都绑定了点击事件
				$('button').click(function() {
					//让当前元素改成红色
					// $(this).css('color', 'red');
					//让兄弟都恢复原样
					// $(this).siblings('button').css('color', '');

					//其他方式===链式编程
					$(this).css('color', 'red').siblings().css('color', '');
				})
			})
		</script>
	</body>
</html>
